Integrand size = 38, antiderivative size = 143 \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (A-i B) \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}-\frac {(3 A+i B) \sqrt {a+i a \tan (c+d x)}}{a d \sqrt {\tan (c+d x)}} \]
(1/2+1/2*I)*(A-I*B)*arctanh((1+I)*a^(1/2)*tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+ c))^(1/2))/d/a^(1/2)+(A+I*B)/d/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c))^(1/2)-( 3*A+I*B)*(a+I*a*tan(d*x+c))^(1/2)/a/d/tan(d*x+c)^(1/2)
Time = 1.57 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.90 \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\frac {\sqrt {2} (i A+B) \text {arctanh}\left (\frac {\sqrt {2} \sqrt {i a \tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \tan (c+d x)}{\sqrt {i a \tan (c+d x)}}+\frac {-4 A+2 (-3 i A+B) \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}}}{2 d \sqrt {\tan (c+d x)}} \]
((Sqrt[2]*(I*A + B)*ArcTanh[(Sqrt[2]*Sqrt[I*a*Tan[c + d*x]])/Sqrt[a + I*a* Tan[c + d*x]]]*Tan[c + d*x])/Sqrt[I*a*Tan[c + d*x]] + (-4*A + 2*((-3*I)*A + B)*Tan[c + d*x])/Sqrt[a + I*a*Tan[c + d*x]])/(2*d*Sqrt[Tan[c + d*x]])
Time = 0.69 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.01, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.237, Rules used = {3042, 4079, 27, 3042, 4081, 27, 3042, 4027, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (c+d x)}{\tan (c+d x)^{3/2} \sqrt {a+i a \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (a (3 A+i B)-2 a (i A-B) \tan (c+d x))}{2 \tan ^{\frac {3}{2}}(c+d x)}dx}{a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (a (3 A+i B)-2 a (i A-B) \tan (c+d x))}{\tan ^{\frac {3}{2}}(c+d x)}dx}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (a (3 A+i B)-2 a (i A-B) \tan (c+d x))}{\tan (c+d x)^{3/2}}dx}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 4081 |
\(\displaystyle \frac {\frac {2 \int \frac {a^2 (i A+B) \sqrt {i \tan (c+d x) a+a}}{2 \sqrt {\tan (c+d x)}}dx}{a}-\frac {2 a (3 A+i B) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a (B+i A) \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sqrt {\tan (c+d x)}}dx-\frac {2 a (3 A+i B) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (B+i A) \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sqrt {\tan (c+d x)}}dx-\frac {2 a (3 A+i B) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 4027 |
\(\displaystyle \frac {-\frac {2 i a^3 (B+i A) \int \frac {1}{-\frac {2 \tan (c+d x) a^2}{i \tan (c+d x) a+a}-i a}d\frac {\sqrt {\tan (c+d x)}}{\sqrt {i \tan (c+d x) a+a}}}{d}-\frac {2 a (3 A+i B) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {(1-i) a^{3/2} (B+i A) \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a (3 A+i B) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}}{2 a^2}+\frac {A+i B}{d \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}\) |
(A + I*B)/(d*Sqrt[Tan[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]]) + (((1 - I)*a^ (3/2)*(I*A + B)*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a* Tan[c + d*x]]])/d - (2*a*(3*A + I*B)*Sqrt[a + I*a*Tan[c + d*x]])/(d*Sqrt[T an[c + d*x]]))/(2*a^2)
3.2.82.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[-2*a*(b/f) Subst[Int[1/(a*c - b*d - 2* a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && N eQ[c^2 + d^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*( b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Free Q[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && !GtQ[n, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*d - B*c)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(f*(n + 1)*(c^2 + d^2))), x] - Simp[1/(a*(n + 1)*(c^2 + d^2)) Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*(b*d*m - a*c*(n + 1)) - B*(b*c* m + a*d*(n + 1)) - a*(B*c - A*d)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Fr eeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[n, -1]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 694 vs. \(2 (117 ) = 234\).
Time = 0.18 (sec) , antiderivative size = 695, normalized size of antiderivative = 4.86
method | result | size |
derivativedivides | \(-\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (i B \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {2}\, a \left (\tan ^{3}\left (d x +c \right )\right )+2 i A \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-A \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {2}\, a \left (\tan ^{3}\left (d x +c \right )\right )-i B \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \tan \left (d x +c \right )+4 i B \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \left (\tan ^{2}\left (d x +c \right )\right )+2 B \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-20 i A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )+A \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \tan \left (d x +c \right )+12 A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \left (\tan ^{2}\left (d x +c \right )\right )+4 B \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )-8 A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\right )}{4 d a \sqrt {\tan \left (d x +c \right )}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\, \left (-\tan \left (d x +c \right )+i\right )^{2}}\) | \(695\) |
default | \(-\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (i B \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {2}\, a \left (\tan ^{3}\left (d x +c \right )\right )+2 i A \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-A \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {2}\, a \left (\tan ^{3}\left (d x +c \right )\right )-i B \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \tan \left (d x +c \right )+4 i B \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \left (\tan ^{2}\left (d x +c \right )\right )+2 B \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-20 i A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )+A \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \tan \left (d x +c \right )+12 A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \left (\tan ^{2}\left (d x +c \right )\right )+4 B \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )-8 A \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\right )}{4 d a \sqrt {\tan \left (d x +c \right )}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\, \left (-\tan \left (d x +c \right )+i\right )^{2}}\) | \(695\) |
parts | \(-\frac {A \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (2 i \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a -\sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \left (\tan ^{3}\left (d x +c \right )\right ) a -20 i \tan \left (d x +c \right ) \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+\sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \tan \left (d x +c \right ) a +12 \sqrt {-i a}\, \left (\tan ^{2}\left (d x +c \right )\right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-8 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\right )}{4 d a \sqrt {\tan \left (d x +c \right )}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \left (-\tan \left (d x +c \right )+i\right )^{2} \sqrt {-i a}}-\frac {B \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (\sqrt {\tan }\left (d x +c \right )\right ) \left (i \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a -i \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a +4 i \tan \left (d x +c \right ) \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+2 \sqrt {2}\, \ln \left (\frac {2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-i a +3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \tan \left (d x +c \right ) a +4 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\right )}{4 d a \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\, \left (-\tan \left (d x +c \right )+i\right )^{2}}\) | \(743\) |
-1/4/d*(a*(1+I*tan(d*x+c)))^(1/2)*(I*B*ln((2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d *x+c)*(1+I*tan(d*x+c)))^(1/2)-I*a+3*a*tan(d*x+c))/(tan(d*x+c)+I))*2^(1/2)* a*tan(d*x+c)^3+2*I*A*ln((2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x +c)))^(1/2)-I*a+3*a*tan(d*x+c))/(tan(d*x+c)+I))*2^(1/2)*a*tan(d*x+c)^2-A*l n((2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)-I*a+3*a*ta n(d*x+c))/(tan(d*x+c)+I))*2^(1/2)*a*tan(d*x+c)^3-I*B*ln((2*2^(1/2)*(-I*a)^ (1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)-I*a+3*a*tan(d*x+c))/(tan(d*x+c )+I))*2^(1/2)*a*tan(d*x+c)+4*I*B*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c )))^(1/2)*tan(d*x+c)^2+2*B*2^(1/2)*ln((2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c )*(1+I*tan(d*x+c)))^(1/2)-I*a+3*a*tan(d*x+c))/(tan(d*x+c)+I))*a*tan(d*x+c) ^2-20*I*A*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*tan(d*x+c)+A* 2^(1/2)*ln((2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)-I *a+3*a*tan(d*x+c))/(tan(d*x+c)+I))*a*tan(d*x+c)+12*A*(-I*a)^(1/2)*(a*tan(d *x+c)*(1+I*tan(d*x+c)))^(1/2)*tan(d*x+c)^2+4*B*(-I*a)^(1/2)*(a*tan(d*x+c)* (1+I*tan(d*x+c)))^(1/2)*tan(d*x+c)-8*A*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan (d*x+c)))^(1/2))/a/tan(d*x+c)^(1/2)/(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)/ (-I*a)^(1/2)/(-tan(d*x+c)+I)^2
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 473 vs. \(2 (109) = 218\).
Time = 0.28 (sec) , antiderivative size = 473, normalized size of antiderivative = 3.31 \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\sqrt {2} {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} - a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {-i \, A^{2} - 2 \, A B + i \, B^{2}}{a d^{2}}} \log \left (\frac {\sqrt {2} a d \sqrt {-\frac {-i \, A^{2} - 2 \, A B + i \, B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{4 i \, A + 4 \, B}\right ) - \sqrt {2} {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} - a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {-i \, A^{2} - 2 \, A B + i \, B^{2}}{a d^{2}}} \log \left (-\frac {\sqrt {2} a d \sqrt {-\frac {-i \, A^{2} - 2 \, A B + i \, B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} - \sqrt {2} {\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{4 i \, A + 4 \, B}\right ) - 2 \, \sqrt {2} {\left ({\left (5 i \, A - B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 4 i \, A e^{\left (2 i \, d x + 2 i \, c\right )} - i \, A + B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{4 \, {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} - a d e^{\left (i \, d x + i \, c\right )}\right )}} \]
1/4*(sqrt(2)*(a*d*e^(3*I*d*x + 3*I*c) - a*d*e^(I*d*x + I*c))*sqrt(-(-I*A^2 - 2*A*B + I*B^2)/(a*d^2))*log((sqrt(2)*a*d*sqrt(-(-I*A^2 - 2*A*B + I*B^2) /(a*d^2))*e^(I*d*x + I*c) + sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e ^(2*I*d*x + 2*I*c) + 1)))/(4*I*A + 4*B)) - sqrt(2)*(a*d*e^(3*I*d*x + 3*I*c ) - a*d*e^(I*d*x + I*c))*sqrt(-(-I*A^2 - 2*A*B + I*B^2)/(a*d^2))*log(-(sqr t(2)*a*d*sqrt(-(-I*A^2 - 2*A*B + I*B^2)/(a*d^2))*e^(I*d*x + I*c) - sqrt(2) *((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1 ))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))/(4*I*A + 4*B)) - 2*sqrt(2)*((5*I*A - B)*e^(4*I*d*x + 4*I*c) + 4*I*A*e^(2*I*d*x + 2* I*c) - I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2* I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))/(a*d*e^(3*I*d*x + 3*I*c) - a*d*e^(I* d*x + I*c))
\[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {A + B \tan {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \tan ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\text {Exception raised: RuntimeError} \]
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\text {Exception raised: NotImplementedError} \]
Exception raised: NotImplementedError >> unable to parse Giac output: -2*i *sageVARA*(-i)/sageVARa/sageVARd*sqrt(i*sageVARa*tan(sageVARc+sageVARd*sag eVARx)+sageVARa)*sqrt(2*sageVARa^2-2*sageVARa*(sqrt(i*sageVARa*tan(sageVAR c+sageVARd*sageVARx
Timed out. \[ \int \frac {A+B \tan (c+d x)}{\tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {A+B\,\mathrm {tan}\left (c+d\,x\right )}{{\mathrm {tan}\left (c+d\,x\right )}^{3/2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]